Conversation
kih1015
approved these changes
Nov 19, 2025
Comment on lines
+32
to
+34
| @ManyToOne(fetch = FetchType.LAZY) | ||
| @JoinColumn(name = "photo_id", nullable = false) | ||
| private Photo photo; |
Contributor
There was a problem hiding this comment.
C
앨범 애그리거트에서 사진 애그리거트를 직접 참조하는 것에 대해 어떻게 생각하시나요?
다른 애그리거트는 id 형태로 간접 참조해도 괜찮지 않을까 생각합니다.
Comment on lines
+28
to
+30
| @ManyToOne(fetch = FetchType.LAZY) | ||
| @JoinColumn(name = "album_id", nullable = false) | ||
| private Album album; |
Contributor
There was a problem hiding this comment.
C
루트 애그리거트를 Album 이라고 생각하는데 어떤가요?
Album에서 리스트형태로 AlbumPhoto를 관리하고
AlbumPhoto는 Embeddable로 보는 것도 괜찮다고 생각합니다.
더불어 앨범이 삭제될경우 AlbumPhoto도 같이 삭제될 수 있도록 Cascade 설정도 할 필요가 있어 보여요.
Comment on lines
+11
to
+17
| create table if not exists albums_photos | ||
| ( | ||
| id bigint unsigned auto_increment | ||
| primary key, | ||
| album_id bigint, | ||
| photo_id bigint | ||
| ) |
Contributor
There was a problem hiding this comment.
C
참조키 제약조건을 걸 수도 있을 것 같은데 어떻게 생각하시나요? 고민이 되는 부분입니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 ISSUE 번호
📄 작업 내용 요약
🏗️ 앨범 테이블 설계
📦 앨범-사진 관계 도메인
AlbumPhoto정의🕹️ 앨범 CRUD 추가
🔍 지도 사진 조회 API 검색 조건 변경
from)와 끝 날짜(to) 범위 내의 사진을PhotoMarker로 변환albumId에 해당하는 사진을PhotoMarker로 변환📢 참고 사항
✅ 체크리스트